package com.design;

/**
 * 经理审批
 */
public class ManagerApprove extends Approve {
    /**
     * 审批方法
     */
    @Override
    public void approve(Leave leave) {
        if (leave.getLeaveDays() <= 7) {
            System.out.println("【经理】批准了"+leave.getLeavePerson()+"的"+leave.getLeaveDays()+"天请假");
        } else {
            System.out.println("【经理】无权审批"+leave.getLeaveDays()+"天假期，转交老板。。。。");
            nextApprove.approve(leave);
        }
    }
}
